package com.qj.yantaishan.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.beans.factory.annotation.Autowired;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;
import com.qj.yantaishan.mapper.ImageTextMapper;
import com.qj.yantaishan.domain.ImageText;
import com.qj.yantaishan.service.IImageTextService;
import com.qj.yantaishan.common.core.text.Convert;

/**
 * 图文Service业务层处理
 * 
 * @author qihe
 * @date 2022-07-22
 */
@Service
@Primary
public class ImageTextServiceImpl    extends ServiceImpl<ImageTextMapper, ImageText>  implements IImageTextService
{
    @Autowired
    private ImageTextMapper imageTextMapper;

    /**
     * 查询图文
     * 
     * @param pigcmsId 图文主键
     * @return 图文
     */
    @Override
    public ImageText selectImageTextByPigcmsId(Long pigcmsId)
    {
        return imageTextMapper.selectImageTextByPigcmsId(pigcmsId);
    }

    /**
     * 查询图文列表
     * 
     * @param imageText 图文
     * @return 图文
     */
    @Override
    public List<ImageText> selectImageTextList(ImageText imageText)
    {
        return imageTextMapper.selectImageTextList(imageText);
    }

    /**
     * 新增图文
     * 
     * @param imageText 图文
     * @return 结果
     */
    @Override
    public int insertImageText(ImageText imageText)
    {
        return imageTextMapper.insertImageText(imageText);
    }

    /**
     * 修改图文
     * 
     * @param imageText 图文
     * @return 结果
     */
    @Override
    public int updateImageText(ImageText imageText)
    {
        return imageTextMapper.updateImageText(imageText);
    }

    /**
     * 批量删除图文
     * 
     * @param pigcmsIds 需要删除的图文主键
     * @return 结果
     */
    @Override
    public int deleteImageTextByPigcmsIds(String pigcmsIds)
    {
        return imageTextMapper.deleteImageTextByPigcmsIds(Convert.toStrArray(pigcmsIds));
    }

    /**
     * 删除图文信息
     * 
     * @param pigcmsId 图文主键
     * @return 结果
     */
    @Override
    public int deleteImageTextByPigcmsId(Long pigcmsId)
    {
        return imageTextMapper.deleteImageTextByPigcmsId(pigcmsId);
    }
}
